﻿using GameCreator.Core;
using UnityEngine;


namespace Gp.Scripts.Core
{
    public class BasicPropUnit : BaseUnit
    {
        public override void AfterComponentInit()
        {
            this.RegisterEvent<Event_Unit.Select>(args =>
            {
                if (!this.EntityBehaviour.TryGetComponent<Trigger>(out var trigger)) return;
                trigger.Execute(this.gameObject);
            });
        }
    }
}